<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
	<script src="lib/react.development.js"></script>
	<script src="lib/react-dom.development.js"></script>
	<script src="lib/babel.min.js"></script>
</head>
<body>
<div id="root"></div>
</body>
<script type="text/babel">
	// zhangpeiyue
	const root = ReactDOM.createRoot(document.querySelector("#root"));
	class App extends React.Component{
		constructor() {
			super();
			console.log("1-app-constructor");
		}
		componentDidMount(){
			console.log("8-app-componentDidMount");
		}
		UNSAFE_componentWillMount(){
			console.log("2-app-UNSAFE_componentWillMount");
		}
		render(){
			console.log("3-app-render");
			return (
				<div>
					<h3>App</h3>
					<Child/>
				</div>
			)
		}
	}
	class Child extends React.Component{
		constructor() {
			super();
			console.log("4-Child-constructor");
		}
		componentDidMount(){
			console.log("7-Child-componentDidMount");
		}
		UNSAFE_componentWillMount(){
			console.log("5-Child-UNSAFE_componentWillMount");
		}
		render(){
			console.log("6-Child-render")
			return (
				<div>
					<h3>Child</h3>
				</div>
			)
		}
	}
	root.render(<App/>)
</script>
</html>